Skip to content

Conversation

@crockeo
Copy link

@crockeo crockeo commented May 28, 2025

I have a use-case where I would like to attach teams to a pre-existing project, without having to manage the entire project via Terraform. This PR implements the beginnings of a sentry_project_membership resource, which one could use to:

  • Import a project w/ a data "sentry_project" ...
  • Provision or import a team
  • Attach it to the project with:
resource "sentry_project_membership" "example" {
    project_id = sentry_project.example.id
    team_id = sentry_team.example.id
}

The idea here is very similar to AWS's use of ingress/egress on aws_security_group vs. declaring separate aws_vpc_security_group_ingress_rules. With the former you have to manage the entire security group in one place, and with the latter you can distribute management throughout your TF workspace.

This approach has some really sharp edges sitting alongside the teams field on sentry_project, so I understand if you aren't interested in accepting a contribution like this, but I would be interested to chat it through with you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant